import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);
import Home from '@/components/Home.vue';//主页
import Myjd1 from '@/components/Myjd1.vue';//我的未登录页面
import Myjd2 from '@/components/Myjd2.vue';//我的已登录页面
import OrderLogin from '@/components/OrderLogin.vue';//订单未登录页面
import Order from '@/components/Order.vue';//订单已登录页面
import Login from '@/components/Login.vue';//登录页面
import Register from '@/components/Register.vue';//注册页面
import Store from '@/components/Store.vue';//单个店铺页面
import Goods from '@/components/Goods.vue';//单个店铺里的商品详情
import ShoppingCart from '@/components/ShoppingCart.vue';//购物车页面
import Welfare from '@/components/Welfare.vue';//福利页面
import Shop from '@/components/Shop.vue';


export default new Router({
  routes: [
    {
      path:'/',
      redirect:{name:'home'}
    },
    {
      path: '/home',
      name: 'home',
      component: Home,
    },
    {
      path: '/myjd1',
      name: 'myjd1',
      component: Myjd1,
    },
    {
      path: '/myjd2',
      name: 'myjd2',
      component: Myjd2,
    },
    {
      path: '/orderLogin',
      name: 'orderLogin',
      component: OrderLogin,
    },
    {
      path: '/order',
      name: 'order',
      component: Order,
    },
    {
      path: '/login',
      name: 'login',
      component:Login,
    },
    {
      path: '/register',
      name: 'register',
      component:Register,
    },
    {
      path: '/store/:shop_id',
      name: 'store',
      component:Store,
      props:true,
    },
    {
      path: '/shop/:shop_id',
      name: 'shop',
      component:Shop,
      props:true,
    },
    {
      path: '/goods',
      name: 'goods',
      component:Goods,
    },
    {
      path: '/shopping',
      name: 'shopping',
      component:ShoppingCart,
    },
    {
      path: '/welfare',
      name: 'welfare',
      component:Welfare,
    }
  ]
})
